home *** CD-ROM | disk | FTP | other *** search
/ BlastDOS / [DOS_Application]_BIT_Software_-_BitCom_3.58c_-_Distribution_Disks.zip / ANSWER.ACT < prev    next >
Text File  |  1990-06-01  |  1KB  |  51 lines

  1. trace(1)
  2. { This action file shows you how to use the new script language        }
  3. { to turn your PC into a remote PC where people can call in           }
  4. { This auto log file should be used in auto answer mode.           }
  5. { When the phone ring, your modem answers and connects to the caller   }
  6. { This action is invoked.                           }
  7. { The caller will be asked for a password.                   }
  8. { If he types in "JONATHAN", he is ok to proceed, otherwise, hangup    }
  9. { If ok to proceed, he will be asked the file name he wants to receive }
  10. { Your PC will send him the file in ASCII mode                   }
  11. {                                       }
  12. twait(2,"sec");
  13. @c=1            {counter for number of attempts for password}
  14. :try
  15. @RETURN
  16. "ENTER PASSWORD:"       {get password}
  17. @a=getline
  18. if (substr(@a, 1, 8) <> "JONATHAN") goto :badpw
  19. goto :ok
  20.  
  21. {bad news}
  22. :badpw
  23. "$0d$0ABAD PASSWORD";@return
  24. @c = expr(@c+1);
  25. if (@c > 5) goto :kill        {if more than 5 tries, hang up the line}
  26. goto :try
  27.  
  28. { now we got a good pass word }
  29. :ok
  30. clear
  31. typecr("LOGON OK");
  32. "$0d$0a"
  33. "$0d$0a"
  34. "WELCOME TO BITCOM$0d$0a"
  35. "What file would you like?"
  36. @a=getline
  37. @b=EXIST(@a)
  38. "$0d$0a"
  39. if (@b = 0 ) goto :badfile
  40. if (sendfile(@a, "ASCII") = -1) "Cannot open file$0a$0d";
  41. exit
  42.  
  43. :kill
  44. "Too many attempts..."
  45. hangup
  46. exit
  47.  
  48. :badfile
  49. "File Not Found$0d$0a";
  50. exit
  51.